<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el"%>

<html:html xhtml="true">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><bean:message key="formpage.title" /></title>
<html:base />
<link rel="stylesheet" href="css/struts-training.css"
	charset="UTF-8" type="text/css" />

<!-- TinyMCE -->
<script type="text/javascript"	src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">

		//O2k7 skin
		tinyMCE.init({
			// General options
			mode : "exact",
			elements : "elm1",
			theme : "advanced",
			skin : "o2k7",
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
		
			// Theme options
			theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
			theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
			theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,
		
			// Example content CSS (should be your site CSS)
			content_css : "css/content.css",
		
			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",
		
			// Replace values for the template plugin
			template_replace_values : {
				username : "Some User",
				staffid : "991234"
			}
		});

		// O2k7 skin
		tinyMCE.init({
			// General options
			mode : "exact",
			elements : "elm2",
			theme : "advanced",
			skin : "o2k7",
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
	
			// Theme options
			theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
			theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
			theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,
	
			// Example content CSS (should be your site CSS)
			content_css : "css/content.css",
	
			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",
	
			// Replace values for the template plugin
			template_replace_values : {
				username : "Some User",
				staffid : "991234"
			}
		});
	</script>
<!-- /TinyMCE -->

</head>
<script>
/**
 * Author   : TUYEN-DM
 * Date     : 2009/05/25 
 * Function : submit action according to the button clicked
 */
function fncSubmitAction(val1,val2,actionName){	
	document.NewsForm.submitAction.value = val1;
	document.NewsForm.action = actionName;
	document.NewsForm.submit();
}
</script>
<body background="images/blueAndWhiteBackground.gif">
<div align="center"><br />
<br />
<br />
<h2>Chào các bạn! Đứa nào đây?<bean:message key="formpage.title" /></h2>

<html:errors /> <html:form action="/submitNewsForm" focus="newsTitle"
	method="GET">

	<table width="60%">
		<tr>
			<td align="right"><bean:message key="news.newstitle" />:</td>
			<td align="left"><html:text property="newsTitle" size="16"
				maxlength="25" /></td>
		</tr>

		<tr>
			<td align="right"><bean:message key="news.header" />:</td>
			<td align="left"><html:textarea property="header"
				styleId="elm1" rows="15" cols="80" style="width: 80%" /></td>
		</tr>

		<tr>
			<td align="right"><bean:message key="news.body" />:</td>
			<td align="left"><html:textarea property="body"
				styleId="elm2" rows="35" cols="80" style="width: 80%" /></td>
		</tr>

		<tr>
			<td align="right"><bean:message key="news.source" />:</td>
			<td align="left"><html:text styleClass="mytxtbox"
				property="source" size="16" maxlength="30" /></td>
		</tr>

		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>

	</table>

	<html:hidden property="newsID" />

	<table width="60%">
		<tr>
			<td align="right"><html:image property="save"
				srcKey="image.save" altKey="image.save.alttext"
				bundle="bundle.image"
				onclick="javascript:fncSubmitAction('save','','submitNewsForm.do');" /></td>
			<td align="left"><html:image property="cancel"
				srcKey="image.cancel" altKey="image.cancel.alttext"
				bundle="bundle.image"
				onclick="javascript:fncSubmitAction('cancel','','submitNewsForm.do');" /></td>
		</tr>
	</table>
	<input type="hidden" id="submitAction" name="submitAction" value="" />
</html:form></div>
</body>

</html:html>